//
//  KZVC1.m
//  lg_zhinengbeikao_english
//
//  Created by 朱凯 on 2018/12/10.
//  Copyright © 2018年 zhukai. All rights reserved.
//

#import "KZVC1.h"
#import "KZVC2.h"

#import "KZOptionView.h"
#import "KZOptionPanelView.h"
#import "KZSingleChoiceView.h"

@interface KZVC1 ()



@end

@implementation KZVC1

- (void)dealloc {
    NSLog(@"KZVC1已销毁");
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addNaviItems:@[@"tabbar_image_1s"] mode:KZNavigationItemModeText position:KZNavigationItemPositionModeLeft];
    [self addNaviItems:@[@"tabbar_image_1s"] mode:KZNavigationItemModeImage position:KZNavigationItemPositionModeRight];

    [self setupUI];
}
- (void)setupUI {
    KZSingleChoiceView *subjectView = [KZSingleChoiceView new];
    [self.view addSubview:subjectView];
    [subjectView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.equalTo(@20);
        // 高度由子视图决定
    }];
    
    
}



- (void)onNaviItemClick:(KZNavigationItemPositionMode)position index:(NSInteger)index {
    
    if (position == KZNavigationItemPositionModeRight) {
        KZVC2 *vc = KZVC2.new;
        [self push:vc];
    } else {
        [self dismissViewControllerAnimated:true completion:nil];
    }
}

@end
